//
//  HttpRequest.h
//  极致荟
//
//  Created by hetao on 14-5-29.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SVHTTPRequest.h"
#import "ASIHTTPRequest.h"
#import "ASIFormDataRequest.h"
typedef enum {
    HTTPReturnCodeSuccess=0,              //成功
    HTTPReturnCodeUserOrPasswdError=1,    //用户或密码错误
    HTTPReturnCodeUserAlreadyExists=2,    //用户已经存在
    HTTPReturnCodeUploadFileError=-3,      //上传文件失败
    HTTPReturnCodeCodeError=4,            //返回错误
    HTTPReturnCodeUnknownError=-4,     //未知错误
    HTTPReturnCodeMissingParameter=6,     //缺少参数
    HTTPReturnCodeAPIKEYInvalid=7,         //APIKEY无效/已过期
    HTTPReturnCodeServerConnectError=8,    //和服务器连接错误

}HttpReturnCode;
@interface HttpRequest : NSObject

///post请求
+ (void)httpRequestPost:(NSString *)URL parameters:(id)parameters block:(void (^)(id data,HttpReturnCode rerurncode))blok;

///提交图片
+(void)uploadTopicFile:(NSArray*)dataArray URL:(NSString *)url key:(NSString *)key
                 block:(void (^)(id data,HttpReturnCode rerurncode))blok;

///上传聊天文件（图片，语音）
+(void)uploadMessageFile:(NSData *)data URL:(NSString *)jzhurl key:(NSString *)key  block:(void (^)(id data, HttpReturnCode rerurncode))blok;
@end
